home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DATABASE / FIXLIB2.ZIP;1 / LIBFIX.ZIP / LIBFIX.DOC next >
Encoding:
Text File  |  1993-03-14  |  3.4 KB  |  70 lines

  1. * LIBFIX.PRG
  2. *   Program to replace all occurrences
  3. *       of  CLIPPER501
  4. *     with  CLIPPER520
  5.  
  6.   …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
  7.   ∫   This program can be used to replace all occurrences of one series      ∫
  8.   ∫   of characters or bytes with the contents of another series.            ∫
  9.   ∫                                                                          ∫
  10.   ∫   This program is currently compiled to solve a problem with upgrading   ∫
  11.   ∫   third party libraries from Clipper 5.01 to Clipper 5.2.                ∫
  12.   ∫                                                                          ∫
  13.   ∫   The symbol CLIPPER501 in many libraries needs to be changed to         ∫
  14.   ∫   CLIPPER520.  This can be accomplished using this program instead of    ∫
  15.   ∫   recompiling all of the libraries.                                      ∫
  16.   ∫                                                                          ∫
  17.   ∫   I suggest first rename the old library with an extension of:  *.L50    ∫
  18.   ∫   The program will prompt for the file names for input and output.       ∫
  19.   ∫                                                                          ∫
  20.   ∫   File names may also be entered on the command line as:                 ∫
  21.   ∫       LIBFIX  <Input file>  <Output file>                                ∫
  22.   ∫   Example:                                                               ∫
  23.   ∫       LIBFIX  NANFOR.L50  NANFOR.LIB                                     ∫
  24.   »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
  25.  
  26.  I am not really familiar with why the symbols CLIPPER501 and CLIPPER520 exist,
  27.  but libraries that were compiled with Clipper version 5.01 may not work (link)
  28.  with CA-Clipper 5.2 without modifications.
  29.  
  30.  I found that simply changing the characters "01"  to "20" with a hex editor
  31.  worked fine.  I have several third party libraries that I won't be able to
  32.  get easily recompiled (the manufactures may even want an upgrade fee!).
  33.  So I wrote this program to deal with the larger libraries (my copy of
  34.  NANFOR.LIB had 106 changes to be made).
  35.  
  36.  This program worked on NANFOR.LIB and several other libraries that I have.
  37.  
  38.  Again, I recommend that you keep a copy of the original library.  I renamed
  39.  all of my original libraries to have extensions of  .L50  before running this
  40.  program.
  41.  
  42.  ==============================================================================
  43.  ALSO:
  44.  
  45.  The way that I wrote this program it can be used as a global search & replace
  46.  for ANY binary or ASCII file.  I have frequently needed just such utility in
  47.  the past.
  48.  
  49.  Just edit lines 17 and 18 to contain the "before" and "after" characters.
  50.  Currently those lines are:
  51.      old_str =   "CLIPPER501"
  52.      new_str =   "CLIPPER520"
  53.  
  54.  The only real requirement, based on the way I wrote the program, is that both
  55.  the "before" and "after" (old & new) must be exactly the same length.
  56.  
  57.  The stings can be any ASCII characters, just build up the stings using the
  58.  CHR() function.  For example, to swap carriage return / linefeed codes when
  59.  they are in reverse order you could use:
  60.      old_str = CHR(10) + CHR(13)
  61.      new_str = CHR(13) + CHR(10)
  62.  
  63.  ==============================================================================
  64.  
  65.  This code is released to public domain.
  66.  
  67.  Jerry Wightman
  68.  CompuServe 71075,457
  69.          or 71545,1244
  70.